/**
 * @name         RepNET Shop Model
 * @version      1.0a
 * @author       Kasun Rathnayaka <kazar55@gmail.com>
 * @author       Ramindu Deshapriya <rasade88@gmail.com>
 * @author 		 Prabodha Dissanayake <prabodha89@gmail.com>
 * @author 		 Thusira Dissanayake <thusira14@gmail.com>
 * @about        Developed by MiDi
 * @license	 http://www.gnu.org/licenses/lgpl-2.1.html GNU Lesser General Public License (LGPL)
 * @lastModified 2012.09.24
 */
package com.midi.repnet.models;

public class Shop extends ReturnedElement {
	int region_id;
	String address;
	String phone;
	Region region;
	
	public Shop(int id, int region_id,String name, String address, String phone,Region region) {
		this.id = id;
		this.region_id = region_id;
		this.name = name;
		this.address = address;
		this.phone = phone;
		this.region=region;
	}

	public Shop(int id, String name) {
		this.id = id;
		this.name = name;
	}

	public Shop() {
		
	}

	public int getRegion_id() {
		return region_id;
	}

	public void setRegion_id(int region_id) {
		this.region_id = region_id;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public Region getRegion() {
		return region;
	}

	public void setRegion(Region region) {
		this.region = region;
	}
	
	public String toString() {
		String new_name= this.name+" -"+this.region.getName();
		return new_name;
	}

	public String getNameOrId() {
		if ( this.name.equals("%") ) {
			return this.name;
		}
		else return Integer.toString(this.id);
	}

}
